<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>无标题文档</title>
<script src="../scripts/jquery-1.3.1.js"></script>
<script type="text/javascript">
	$(function(){
		//包含link的标签的href属性为index.html  title属性为test
		    $("a:link").attr({"href":"index.html","title":"test"});
		//获取p标签的class
		       var $p =$("p").attr('class');
			  
			   
		//将p标签的class属性改成class+another
				$("h3:class").replaceWith("<h3 class='class+another'></h3>");
		//点击link交替两种样式
		       
		
	})
</script>
       
</head>

<body>
<h3>例子</h3>
	<a href="#">link1</a>
	<a href="#">link</a>	
	<a href="#">lnk</a>
</body>
</html>
